Left Termination of the query pattern perm_in_2(g, a) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

perm([], []).
perm(L, .(H, T)) :- ','(append2(V, .(H, U), L), ','(append1(V, U, W), perm(W, T))).
append1([], L, L).
append1(.(H, L1), L2, .(H, L3)) :- append1(L1, L2, L3).
append2([], L, L).
append2(.(H, L1), L2, .(H, L3)) :- append2(L1, L2, L3).

Queries:

perm(g,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
perm_in: (b,f) (f,f)
append2_in: (f,b,b) (f,b,f)
append1_in: (b,f,f) (f,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(L, .(H, T)) → U1_GA(L, H, T, append2_in_agg(V, .(H, U), L))
PERM_IN_GA(L, .(H, T)) → APPEND2_IN_AGG(V, .(H, U), L)
APPEND2_IN_AGG(.(H, L1), L2, .(H, L3)) → U5_AGG(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
APPEND2_IN_AGG(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AGA(L1, L2, L3)
APPEND2_IN_AGA(.(H, L1), L2, .(H, L3)) → U5_AGA(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
APPEND2_IN_AGA(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AGA(L1, L2, L3)
U1_GA(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_GA(L, H, T, append1_in_gaa(V, U, W))
U1_GA(L, H, T, append2_out_agg(V, .(H, U), L)) → APPEND1_IN_GAA(V, U, W)
APPEND1_IN_GAA(.(H, L1), L2, .(H, L3)) → U4_GAA(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
APPEND1_IN_GAA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_AAA(L1, L2, L3)
APPEND1_IN_AAA(.(H, L1), L2, .(H, L3)) → U4_AAA(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
APPEND1_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_AAA(L1, L2, L3)
U2_GA(L, H, T, append1_out_gaa(V, U, W)) → U3_GA(L, H, T, perm_in_aa(W, T))
U2_GA(L, H, T, append1_out_gaa(V, U, W)) → PERM_IN_AA(W, T)
PERM_IN_AA(L, .(H, T)) → U1_AA(L, H, T, append2_in_aga(V, .(H, U), L))
PERM_IN_AA(L, .(H, T)) → APPEND2_IN_AGA(V, .(H, U), L)
U1_AA(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_AA(L, H, T, append1_in_gaa(V, U, W))
U1_AA(L, H, T, append2_out_aga(V, .(H, U), L)) → APPEND1_IN_GAA(V, U, W)
U2_AA(L, H, T, append1_out_gaa(V, U, W)) → U3_AA(L, H, T, perm_in_aa(W, T))
U2_AA(L, H, T, append1_out_gaa(V, U, W)) → PERM_IN_AA(W, T)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
APPEND2_IN_AGA(x1, x2, x3)  =  APPEND2_IN_AGA(x2)
U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x5)
U5_AGG(x1, x2, x3, x4, x5)  =  U5_AGG(x5)
APPEND1_IN_AAA(x1, x2, x3)  =  APPEND1_IN_AAA
U4_AAA(x1, x2, x3, x4, x5)  =  U4_AAA(x5)
APPEND2_IN_AGG(x1, x2, x3)  =  APPEND2_IN_AGG(x2, x3)
APPEND1_IN_GAA(x1, x2, x3)  =  APPEND1_IN_GAA(x1)
U4_GAA(x1, x2, x3, x4, x5)  =  U4_GAA(x5)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_AA(x1, x2, x3, x4)  =  U3_AA(x1, x4)
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(L, .(H, T)) → U1_GA(L, H, T, append2_in_agg(V, .(H, U), L))
PERM_IN_GA(L, .(H, T)) → APPEND2_IN_AGG(V, .(H, U), L)
APPEND2_IN_AGG(.(H, L1), L2, .(H, L3)) → U5_AGG(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
APPEND2_IN_AGG(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AGA(L1, L2, L3)
APPEND2_IN_AGA(.(H, L1), L2, .(H, L3)) → U5_AGA(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
APPEND2_IN_AGA(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AGA(L1, L2, L3)
U1_GA(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_GA(L, H, T, append1_in_gaa(V, U, W))
U1_GA(L, H, T, append2_out_agg(V, .(H, U), L)) → APPEND1_IN_GAA(V, U, W)
APPEND1_IN_GAA(.(H, L1), L2, .(H, L3)) → U4_GAA(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
APPEND1_IN_GAA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_AAA(L1, L2, L3)
APPEND1_IN_AAA(.(H, L1), L2, .(H, L3)) → U4_AAA(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
APPEND1_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_AAA(L1, L2, L3)
U2_GA(L, H, T, append1_out_gaa(V, U, W)) → U3_GA(L, H, T, perm_in_aa(W, T))
U2_GA(L, H, T, append1_out_gaa(V, U, W)) → PERM_IN_AA(W, T)
PERM_IN_AA(L, .(H, T)) → U1_AA(L, H, T, append2_in_aga(V, .(H, U), L))
PERM_IN_AA(L, .(H, T)) → APPEND2_IN_AGA(V, .(H, U), L)
U1_AA(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_AA(L, H, T, append1_in_gaa(V, U, W))
U1_AA(L, H, T, append2_out_aga(V, .(H, U), L)) → APPEND1_IN_GAA(V, U, W)
U2_AA(L, H, T, append1_out_gaa(V, U, W)) → U3_AA(L, H, T, perm_in_aa(W, T))
U2_AA(L, H, T, append1_out_gaa(V, U, W)) → PERM_IN_AA(W, T)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
APPEND2_IN_AGA(x1, x2, x3)  =  APPEND2_IN_AGA(x2)
U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x5)
U5_AGG(x1, x2, x3, x4, x5)  =  U5_AGG(x5)
APPEND1_IN_AAA(x1, x2, x3)  =  APPEND1_IN_AAA
U4_AAA(x1, x2, x3, x4, x5)  =  U4_AAA(x5)
APPEND2_IN_AGG(x1, x2, x3)  =  APPEND2_IN_AGG(x2, x3)
APPEND1_IN_GAA(x1, x2, x3)  =  APPEND1_IN_GAA(x1)
U4_GAA(x1, x2, x3, x4, x5)  =  U4_GAA(x5)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_AA(x1, x2, x3, x4)  =  U3_AA(x1, x4)
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 15 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_AAA(L1, L2, L3)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
APPEND1_IN_AAA(x1, x2, x3)  =  APPEND1_IN_AAA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_AAA(L1, L2, L3)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
APPEND1_IN_AAA(x1, x2, x3)  =  APPEND1_IN_AAA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

APPEND1_IN_AAAAPPEND1_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APPEND1_IN_AAAAPPEND1_IN_AAA

The TRS R consists of the following rules:none


s = APPEND1_IN_AAA evaluates to t =APPEND1_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APPEND1_IN_AAA to APPEND1_IN_AAA.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AGA(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AGA(L1, L2, L3)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
APPEND2_IN_AGA(x1, x2, x3)  =  APPEND2_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AGA(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AGA(L1, L2, L3)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
APPEND2_IN_AGA(x1, x2, x3)  =  APPEND2_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AGA(L2) → APPEND2_IN_AGA(L2)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APPEND2_IN_AGA(L2) → APPEND2_IN_AGA(L2)

The TRS R consists of the following rules:none


s = APPEND2_IN_AGA(L2) evaluates to t =APPEND2_IN_AGA(L2)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APPEND2_IN_AGA(L2) to APPEND2_IN_AGA(L2).





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_AA(L, .(H, T)) → U1_AA(L, H, T, append2_in_aga(V, .(H, U), L))
U2_AA(L, H, T, append1_out_gaa(V, U, W)) → PERM_IN_AA(W, T)
U1_AA(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_AA(L, H, T, append1_in_gaa(V, U, W))

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_AA(L, .(H, T)) → U1_AA(L, H, T, append2_in_aga(V, .(H, U), L))
U2_AA(L, H, T, append1_out_gaa(V, U, W)) → PERM_IN_AA(W, T)
U1_AA(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_AA(L, H, T, append1_in_gaa(V, U, W))

The TRS R consists of the following rules:

append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x5)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_AA(append2_out_aga(V, L)) → U2_AA(L, append1_in_gaa(V))
PERM_IN_AAU1_AA(append2_in_aga(.))
U2_AA(L, append1_out_gaa) → PERM_IN_AA

The TRS R consists of the following rules:

append2_in_aga(L) → append2_out_aga([], L)
append2_in_aga(L2) → U5_aga(append2_in_aga(L2))
append1_in_gaa([]) → append1_out_gaa
append1_in_gaa(.) → U4_gaa(append1_in_aaa)
U5_aga(append2_out_aga(L1, L3)) → append2_out_aga(., .)
U4_gaa(append1_out_aaa(L1)) → append1_out_gaa
append1_in_aaaappend1_out_aaa([])
append1_in_aaaU4_aaa(append1_in_aaa)
U4_aaa(append1_out_aaa(L1)) → append1_out_aaa(.)

The set Q consists of the following terms:

append2_in_aga(x0)
append1_in_gaa(x0)
U5_aga(x0)
U4_gaa(x0)
append1_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule PERM_IN_AAU1_AA(append2_in_aga(.)) at position [0] we obtained the following new rules:

PERM_IN_AAU1_AA(append2_out_aga([], .))
PERM_IN_AAU1_AA(U5_aga(append2_in_aga(.)))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

PERM_IN_AAU1_AA(append2_out_aga([], .))
U1_AA(append2_out_aga(V, L)) → U2_AA(L, append1_in_gaa(V))
U2_AA(L, append1_out_gaa) → PERM_IN_AA
PERM_IN_AAU1_AA(U5_aga(append2_in_aga(.)))

The TRS R consists of the following rules:

append2_in_aga(L) → append2_out_aga([], L)
append2_in_aga(L2) → U5_aga(append2_in_aga(L2))
append1_in_gaa([]) → append1_out_gaa
append1_in_gaa(.) → U4_gaa(append1_in_aaa)
U5_aga(append2_out_aga(L1, L3)) → append2_out_aga(., .)
U4_gaa(append1_out_aaa(L1)) → append1_out_gaa
append1_in_aaaappend1_out_aaa([])
append1_in_aaaU4_aaa(append1_in_aaa)
U4_aaa(append1_out_aaa(L1)) → append1_out_aaa(.)

The set Q consists of the following terms:

append2_in_aga(x0)
append1_in_gaa(x0)
U5_aga(x0)
U4_gaa(x0)
append1_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U1_AA(append2_out_aga(V, L)) → U2_AA(L, append1_in_gaa(V)) at position [1] we obtained the following new rules:

U1_AA(append2_out_aga([], y1)) → U2_AA(y1, append1_out_gaa)
U1_AA(append2_out_aga(., y1)) → U2_AA(y1, U4_gaa(append1_in_aaa))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_AA(append2_out_aga([], y1)) → U2_AA(y1, append1_out_gaa)
PERM_IN_AAU1_AA(append2_out_aga([], .))
U2_AA(L, append1_out_gaa) → PERM_IN_AA
U1_AA(append2_out_aga(., y1)) → U2_AA(y1, U4_gaa(append1_in_aaa))
PERM_IN_AAU1_AA(U5_aga(append2_in_aga(.)))

The TRS R consists of the following rules:

append2_in_aga(L) → append2_out_aga([], L)
append2_in_aga(L2) → U5_aga(append2_in_aga(L2))
append1_in_gaa([]) → append1_out_gaa
append1_in_gaa(.) → U4_gaa(append1_in_aaa)
U5_aga(append2_out_aga(L1, L3)) → append2_out_aga(., .)
U4_gaa(append1_out_aaa(L1)) → append1_out_gaa
append1_in_aaaappend1_out_aaa([])
append1_in_aaaU4_aaa(append1_in_aaa)
U4_aaa(append1_out_aaa(L1)) → append1_out_aaa(.)

The set Q consists of the following terms:

append2_in_aga(x0)
append1_in_gaa(x0)
U5_aga(x0)
U4_gaa(x0)
append1_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ QReductionProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_AA(append2_out_aga([], y1)) → U2_AA(y1, append1_out_gaa)
PERM_IN_AAU1_AA(append2_out_aga([], .))
U2_AA(L, append1_out_gaa) → PERM_IN_AA
U1_AA(append2_out_aga(., y1)) → U2_AA(y1, U4_gaa(append1_in_aaa))
PERM_IN_AAU1_AA(U5_aga(append2_in_aga(.)))

The TRS R consists of the following rules:

append2_in_aga(L) → append2_out_aga([], L)
append2_in_aga(L2) → U5_aga(append2_in_aga(L2))
U5_aga(append2_out_aga(L1, L3)) → append2_out_aga(., .)
append1_in_aaaappend1_out_aaa([])
append1_in_aaaU4_aaa(append1_in_aaa)
U4_gaa(append1_out_aaa(L1)) → append1_out_gaa
U4_aaa(append1_out_aaa(L1)) → append1_out_aaa(.)

The set Q consists of the following terms:

append2_in_aga(x0)
append1_in_gaa(x0)
U5_aga(x0)
U4_gaa(x0)
append1_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

append1_in_gaa(x0)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
QDP
                                        ↳ NonTerminationProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_AA(append2_out_aga([], y1)) → U2_AA(y1, append1_out_gaa)
PERM_IN_AAU1_AA(append2_out_aga([], .))
U2_AA(L, append1_out_gaa) → PERM_IN_AA
PERM_IN_AAU1_AA(U5_aga(append2_in_aga(.)))
U1_AA(append2_out_aga(., y1)) → U2_AA(y1, U4_gaa(append1_in_aaa))

The TRS R consists of the following rules:

append2_in_aga(L) → append2_out_aga([], L)
append2_in_aga(L2) → U5_aga(append2_in_aga(L2))
U5_aga(append2_out_aga(L1, L3)) → append2_out_aga(., .)
append1_in_aaaappend1_out_aaa([])
append1_in_aaaU4_aaa(append1_in_aaa)
U4_gaa(append1_out_aaa(L1)) → append1_out_gaa
U4_aaa(append1_out_aaa(L1)) → append1_out_aaa(.)

The set Q consists of the following terms:

append2_in_aga(x0)
U5_aga(x0)
U4_gaa(x0)
append1_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U1_AA(append2_out_aga([], y1)) → U2_AA(y1, append1_out_gaa)
PERM_IN_AAU1_AA(append2_out_aga([], .))
U2_AA(L, append1_out_gaa) → PERM_IN_AA
PERM_IN_AAU1_AA(U5_aga(append2_in_aga(.)))
U1_AA(append2_out_aga(., y1)) → U2_AA(y1, U4_gaa(append1_in_aaa))

The TRS R consists of the following rules:

append2_in_aga(L) → append2_out_aga([], L)
append2_in_aga(L2) → U5_aga(append2_in_aga(L2))
U5_aga(append2_out_aga(L1, L3)) → append2_out_aga(., .)
append1_in_aaaappend1_out_aaa([])
append1_in_aaaU4_aaa(append1_in_aaa)
U4_gaa(append1_out_aaa(L1)) → append1_out_gaa
U4_aaa(append1_out_aaa(L1)) → append1_out_aaa(.)


s = U2_AA(L, append1_out_gaa) evaluates to t =U2_AA(., append1_out_gaa)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U2_AA(L, append1_out_gaa)PERM_IN_AA
with rule U2_AA(L', append1_out_gaa) → PERM_IN_AA at position [] and matcher [L' / L]

PERM_IN_AAU1_AA(append2_out_aga([], .))
with rule PERM_IN_AAU1_AA(append2_out_aga([], .)) at position [] and matcher [ ]

U1_AA(append2_out_aga([], .))U2_AA(., append1_out_gaa)
with rule U1_AA(append2_out_aga([], y1)) → U2_AA(y1, append1_out_gaa)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
perm_in: (b,f) (f,f)
append2_in: (f,b,b) (f,b,f)
append1_in: (b,f,f) (f,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1, x2, x3)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x3, x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x3, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1, x2, x3)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x3, x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x3, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(L, .(H, T)) → U1_GA(L, H, T, append2_in_agg(V, .(H, U), L))
PERM_IN_GA(L, .(H, T)) → APPEND2_IN_AGG(V, .(H, U), L)
APPEND2_IN_AGG(.(H, L1), L2, .(H, L3)) → U5_AGG(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
APPEND2_IN_AGG(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AGA(L1, L2, L3)
APPEND2_IN_AGA(.(H, L1), L2, .(H, L3)) → U5_AGA(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
APPEND2_IN_AGA(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AGA(L1, L2, L3)
U1_GA(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_GA(L, H, T, append1_in_gaa(V, U, W))
U1_GA(L, H, T, append2_out_agg(V, .(H, U), L)) → APPEND1_IN_GAA(V, U, W)
APPEND1_IN_GAA(.(H, L1), L2, .(H, L3)) → U4_GAA(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
APPEND1_IN_GAA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_AAA(L1, L2, L3)
APPEND1_IN_AAA(.(H, L1), L2, .(H, L3)) → U4_AAA(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
APPEND1_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_AAA(L1, L2, L3)
U2_GA(L, H, T, append1_out_gaa(V, U, W)) → U3_GA(L, H, T, perm_in_aa(W, T))
U2_GA(L, H, T, append1_out_gaa(V, U, W)) → PERM_IN_AA(W, T)
PERM_IN_AA(L, .(H, T)) → U1_AA(L, H, T, append2_in_aga(V, .(H, U), L))
PERM_IN_AA(L, .(H, T)) → APPEND2_IN_AGA(V, .(H, U), L)
U1_AA(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_AA(L, H, T, append1_in_gaa(V, U, W))
U1_AA(L, H, T, append2_out_aga(V, .(H, U), L)) → APPEND1_IN_GAA(V, U, W)
U2_AA(L, H, T, append1_out_gaa(V, U, W)) → U3_AA(L, H, T, perm_in_aa(W, T))
U2_AA(L, H, T, append1_out_gaa(V, U, W)) → PERM_IN_AA(W, T)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1, x2, x3)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x3, x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x3, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x1, x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x4)
APPEND2_IN_AGA(x1, x2, x3)  =  APPEND2_IN_AGA(x2)
U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x3, x5)
U5_AGG(x1, x2, x3, x4, x5)  =  U5_AGG(x3, x5)
APPEND1_IN_AAA(x1, x2, x3)  =  APPEND1_IN_AAA
U4_AAA(x1, x2, x3, x4, x5)  =  U4_AAA(x5)
APPEND2_IN_AGG(x1, x2, x3)  =  APPEND2_IN_AGG(x2, x3)
APPEND1_IN_GAA(x1, x2, x3)  =  APPEND1_IN_GAA(x1)
U4_GAA(x1, x2, x3, x4, x5)  =  U4_GAA(x5)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_AA(x1, x2, x3, x4)  =  U3_AA(x1, x4)
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(L, .(H, T)) → U1_GA(L, H, T, append2_in_agg(V, .(H, U), L))
PERM_IN_GA(L, .(H, T)) → APPEND2_IN_AGG(V, .(H, U), L)
APPEND2_IN_AGG(.(H, L1), L2, .(H, L3)) → U5_AGG(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
APPEND2_IN_AGG(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AGA(L1, L2, L3)
APPEND2_IN_AGA(.(H, L1), L2, .(H, L3)) → U5_AGA(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
APPEND2_IN_AGA(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AGA(L1, L2, L3)
U1_GA(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_GA(L, H, T, append1_in_gaa(V, U, W))
U1_GA(L, H, T, append2_out_agg(V, .(H, U), L)) → APPEND1_IN_GAA(V, U, W)
APPEND1_IN_GAA(.(H, L1), L2, .(H, L3)) → U4_GAA(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
APPEND1_IN_GAA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_AAA(L1, L2, L3)
APPEND1_IN_AAA(.(H, L1), L2, .(H, L3)) → U4_AAA(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
APPEND1_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_AAA(L1, L2, L3)
U2_GA(L, H, T, append1_out_gaa(V, U, W)) → U3_GA(L, H, T, perm_in_aa(W, T))
U2_GA(L, H, T, append1_out_gaa(V, U, W)) → PERM_IN_AA(W, T)
PERM_IN_AA(L, .(H, T)) → U1_AA(L, H, T, append2_in_aga(V, .(H, U), L))
PERM_IN_AA(L, .(H, T)) → APPEND2_IN_AGA(V, .(H, U), L)
U1_AA(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_AA(L, H, T, append1_in_gaa(V, U, W))
U1_AA(L, H, T, append2_out_aga(V, .(H, U), L)) → APPEND1_IN_GAA(V, U, W)
U2_AA(L, H, T, append1_out_gaa(V, U, W)) → U3_AA(L, H, T, perm_in_aa(W, T))
U2_AA(L, H, T, append1_out_gaa(V, U, W)) → PERM_IN_AA(W, T)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1, x2, x3)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x3, x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x3, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x1, x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x4)
APPEND2_IN_AGA(x1, x2, x3)  =  APPEND2_IN_AGA(x2)
U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x3, x5)
U5_AGG(x1, x2, x3, x4, x5)  =  U5_AGG(x3, x5)
APPEND1_IN_AAA(x1, x2, x3)  =  APPEND1_IN_AAA
U4_AAA(x1, x2, x3, x4, x5)  =  U4_AAA(x5)
APPEND2_IN_AGG(x1, x2, x3)  =  APPEND2_IN_AGG(x2, x3)
APPEND1_IN_GAA(x1, x2, x3)  =  APPEND1_IN_GAA(x1)
U4_GAA(x1, x2, x3, x4, x5)  =  U4_GAA(x5)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_AA(x1, x2, x3, x4)  =  U3_AA(x1, x4)
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 15 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_AAA(L1, L2, L3)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1, x2, x3)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x3, x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x3, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
APPEND1_IN_AAA(x1, x2, x3)  =  APPEND1_IN_AAA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND1_IN_AAA(.(H, L1), L2, .(H, L3)) → APPEND1_IN_AAA(L1, L2, L3)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
APPEND1_IN_AAA(x1, x2, x3)  =  APPEND1_IN_AAA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APPEND1_IN_AAAAPPEND1_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APPEND1_IN_AAAAPPEND1_IN_AAA

The TRS R consists of the following rules:none


s = APPEND1_IN_AAA evaluates to t =APPEND1_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APPEND1_IN_AAA to APPEND1_IN_AAA.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AGA(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AGA(L1, L2, L3)

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1, x2, x3)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x3, x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x3, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
APPEND2_IN_AGA(x1, x2, x3)  =  APPEND2_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AGA(.(H, L1), L2, .(H, L3)) → APPEND2_IN_AGA(L1, L2, L3)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
APPEND2_IN_AGA(x1, x2, x3)  =  APPEND2_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APPEND2_IN_AGA(L2) → APPEND2_IN_AGA(L2)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APPEND2_IN_AGA(L2) → APPEND2_IN_AGA(L2)

The TRS R consists of the following rules:none


s = APPEND2_IN_AGA(L2) evaluates to t =APPEND2_IN_AGA(L2)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APPEND2_IN_AGA(L2) to APPEND2_IN_AGA(L2).





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_AA(L, .(H, T)) → U1_AA(L, H, T, append2_in_aga(V, .(H, U), L))
U2_AA(L, H, T, append1_out_gaa(V, U, W)) → PERM_IN_AA(W, T)
U1_AA(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_AA(L, H, T, append1_in_gaa(V, U, W))

The TRS R consists of the following rules:

perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(L, .(H, T)) → U1_ga(L, H, T, append2_in_agg(V, .(H, U), L))
append2_in_agg([], L, L) → append2_out_agg([], L, L)
append2_in_agg(.(H, L1), L2, .(H, L3)) → U5_agg(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U5_agg(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_agg(.(H, L1), L2, .(H, L3))
U1_ga(L, H, T, append2_out_agg(V, .(H, U), L)) → U2_ga(L, H, T, append1_in_gaa(V, U, W))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
U2_ga(L, H, T, append1_out_gaa(V, U, W)) → U3_ga(L, H, T, perm_in_aa(W, T))
perm_in_aa([], []) → perm_out_aa([], [])
perm_in_aa(L, .(H, T)) → U1_aa(L, H, T, append2_in_aga(V, .(H, U), L))
U1_aa(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_aa(L, H, T, append1_in_gaa(V, U, W))
U2_aa(L, H, T, append1_out_gaa(V, U, W)) → U3_aa(L, H, T, perm_in_aa(W, T))
U3_aa(L, H, T, perm_out_aa(W, T)) → perm_out_aa(L, .(H, T))
U3_ga(L, H, T, perm_out_aa(W, T)) → perm_out_ga(L, .(H, T))

The argument filtering Pi contains the following mapping:
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
append2_in_agg(x1, x2, x3)  =  append2_in_agg(x2, x3)
.(x1, x2)  =  .
append2_out_agg(x1, x2, x3)  =  append2_out_agg(x1, x2, x3)
U5_agg(x1, x2, x3, x4, x5)  =  U5_agg(x3, x5)
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x3, x5)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x1, x4)
perm_in_aa(x1, x2)  =  perm_in_aa
perm_out_aa(x1, x2)  =  perm_out_aa(x1, x2)
U1_aa(x1, x2, x3, x4)  =  U1_aa(x4)
U2_aa(x1, x2, x3, x4)  =  U2_aa(x1, x4)
U3_aa(x1, x2, x3, x4)  =  U3_aa(x1, x4)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

PERM_IN_AA(L, .(H, T)) → U1_AA(L, H, T, append2_in_aga(V, .(H, U), L))
U2_AA(L, H, T, append1_out_gaa(V, U, W)) → PERM_IN_AA(W, T)
U1_AA(L, H, T, append2_out_aga(V, .(H, U), L)) → U2_AA(L, H, T, append1_in_gaa(V, U, W))

The TRS R consists of the following rules:

append2_in_aga([], L, L) → append2_out_aga([], L, L)
append2_in_aga(.(H, L1), L2, .(H, L3)) → U5_aga(H, L1, L2, L3, append2_in_aga(L1, L2, L3))
append1_in_gaa([], L, L) → append1_out_gaa([], L, L)
append1_in_gaa(.(H, L1), L2, .(H, L3)) → U4_gaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U5_aga(H, L1, L2, L3, append2_out_aga(L1, L2, L3)) → append2_out_aga(.(H, L1), L2, .(H, L3))
U4_gaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_gaa(.(H, L1), L2, .(H, L3))
append1_in_aaa([], L, L) → append1_out_aaa([], L, L)
append1_in_aaa(.(H, L1), L2, .(H, L3)) → U4_aaa(H, L1, L2, L3, append1_in_aaa(L1, L2, L3))
U4_aaa(H, L1, L2, L3, append1_out_aaa(L1, L2, L3)) → append1_out_aaa(.(H, L1), L2, .(H, L3))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .
append2_in_aga(x1, x2, x3)  =  append2_in_aga(x2)
append2_out_aga(x1, x2, x3)  =  append2_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x3, x5)
append1_in_gaa(x1, x2, x3)  =  append1_in_gaa(x1)
append1_out_gaa(x1, x2, x3)  =  append1_out_gaa(x1)
U4_gaa(x1, x2, x3, x4, x5)  =  U4_gaa(x5)
append1_in_aaa(x1, x2, x3)  =  append1_in_aaa
append1_out_aaa(x1, x2, x3)  =  append1_out_aaa(x1)
U4_aaa(x1, x2, x3, x4, x5)  =  U4_aaa(x5)
U2_AA(x1, x2, x3, x4)  =  U2_AA(x1, x4)
PERM_IN_AA(x1, x2)  =  PERM_IN_AA
U1_AA(x1, x2, x3, x4)  =  U1_AA(x4)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U2_AA(L, append1_out_gaa(V)) → PERM_IN_AA
PERM_IN_AAU1_AA(append2_in_aga(.))
U1_AA(append2_out_aga(V, ., L)) → U2_AA(L, append1_in_gaa(V))

The TRS R consists of the following rules:

append2_in_aga(L) → append2_out_aga([], L, L)
append2_in_aga(L2) → U5_aga(L2, append2_in_aga(L2))
append1_in_gaa([]) → append1_out_gaa([])
append1_in_gaa(.) → U4_gaa(append1_in_aaa)
U5_aga(L2, append2_out_aga(L1, L2, L3)) → append2_out_aga(., L2, .)
U4_gaa(append1_out_aaa(L1)) → append1_out_gaa(.)
append1_in_aaaappend1_out_aaa([])
append1_in_aaaU4_aaa(append1_in_aaa)
U4_aaa(append1_out_aaa(L1)) → append1_out_aaa(.)

The set Q consists of the following terms:

append2_in_aga(x0)
append1_in_gaa(x0)
U5_aga(x0, x1)
U4_gaa(x0)
append1_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule PERM_IN_AAU1_AA(append2_in_aga(.)) at position [0] we obtained the following new rules:

PERM_IN_AAU1_AA(append2_out_aga([], ., .))
PERM_IN_AAU1_AA(U5_aga(., append2_in_aga(.)))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

PERM_IN_AAU1_AA(append2_out_aga([], ., .))
U2_AA(L, append1_out_gaa(V)) → PERM_IN_AA
PERM_IN_AAU1_AA(U5_aga(., append2_in_aga(.)))
U1_AA(append2_out_aga(V, ., L)) → U2_AA(L, append1_in_gaa(V))

The TRS R consists of the following rules:

append2_in_aga(L) → append2_out_aga([], L, L)
append2_in_aga(L2) → U5_aga(L2, append2_in_aga(L2))
append1_in_gaa([]) → append1_out_gaa([])
append1_in_gaa(.) → U4_gaa(append1_in_aaa)
U5_aga(L2, append2_out_aga(L1, L2, L3)) → append2_out_aga(., L2, .)
U4_gaa(append1_out_aaa(L1)) → append1_out_gaa(.)
append1_in_aaaappend1_out_aaa([])
append1_in_aaaU4_aaa(append1_in_aaa)
U4_aaa(append1_out_aaa(L1)) → append1_out_aaa(.)

The set Q consists of the following terms:

append2_in_aga(x0)
append1_in_gaa(x0)
U5_aga(x0, x1)
U4_gaa(x0)
append1_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U1_AA(append2_out_aga(V, ., L)) → U2_AA(L, append1_in_gaa(V)) at position [1] we obtained the following new rules:

U1_AA(append2_out_aga(., ., y1)) → U2_AA(y1, U4_gaa(append1_in_aaa))
U1_AA(append2_out_aga([], ., y1)) → U2_AA(y1, append1_out_gaa([]))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

PERM_IN_AAU1_AA(append2_out_aga([], ., .))
U2_AA(L, append1_out_gaa(V)) → PERM_IN_AA
U1_AA(append2_out_aga(., ., y1)) → U2_AA(y1, U4_gaa(append1_in_aaa))
PERM_IN_AAU1_AA(U5_aga(., append2_in_aga(.)))
U1_AA(append2_out_aga([], ., y1)) → U2_AA(y1, append1_out_gaa([]))

The TRS R consists of the following rules:

append2_in_aga(L) → append2_out_aga([], L, L)
append2_in_aga(L2) → U5_aga(L2, append2_in_aga(L2))
append1_in_gaa([]) → append1_out_gaa([])
append1_in_gaa(.) → U4_gaa(append1_in_aaa)
U5_aga(L2, append2_out_aga(L1, L2, L3)) → append2_out_aga(., L2, .)
U4_gaa(append1_out_aaa(L1)) → append1_out_gaa(.)
append1_in_aaaappend1_out_aaa([])
append1_in_aaaU4_aaa(append1_in_aaa)
U4_aaa(append1_out_aaa(L1)) → append1_out_aaa(.)

The set Q consists of the following terms:

append2_in_aga(x0)
append1_in_gaa(x0)
U5_aga(x0, x1)
U4_gaa(x0)
append1_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

PERM_IN_AAU1_AA(append2_out_aga([], ., .))
U2_AA(L, append1_out_gaa(V)) → PERM_IN_AA
U1_AA(append2_out_aga(., ., y1)) → U2_AA(y1, U4_gaa(append1_in_aaa))
PERM_IN_AAU1_AA(U5_aga(., append2_in_aga(.)))
U1_AA(append2_out_aga([], ., y1)) → U2_AA(y1, append1_out_gaa([]))

The TRS R consists of the following rules:

append2_in_aga(L) → append2_out_aga([], L, L)
append2_in_aga(L2) → U5_aga(L2, append2_in_aga(L2))
U5_aga(L2, append2_out_aga(L1, L2, L3)) → append2_out_aga(., L2, .)
append1_in_aaaappend1_out_aaa([])
append1_in_aaaU4_aaa(append1_in_aaa)
U4_gaa(append1_out_aaa(L1)) → append1_out_gaa(.)
U4_aaa(append1_out_aaa(L1)) → append1_out_aaa(.)

The set Q consists of the following terms:

append2_in_aga(x0)
append1_in_gaa(x0)
U5_aga(x0, x1)
U4_gaa(x0)
append1_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

append1_in_gaa(x0)



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
QDP
                                        ↳ NonTerminationProof

Q DP problem:
The TRS P consists of the following rules:

PERM_IN_AAU1_AA(append2_out_aga([], ., .))
U2_AA(L, append1_out_gaa(V)) → PERM_IN_AA
U1_AA(append2_out_aga(., ., y1)) → U2_AA(y1, U4_gaa(append1_in_aaa))
PERM_IN_AAU1_AA(U5_aga(., append2_in_aga(.)))
U1_AA(append2_out_aga([], ., y1)) → U2_AA(y1, append1_out_gaa([]))

The TRS R consists of the following rules:

append2_in_aga(L) → append2_out_aga([], L, L)
append2_in_aga(L2) → U5_aga(L2, append2_in_aga(L2))
U5_aga(L2, append2_out_aga(L1, L2, L3)) → append2_out_aga(., L2, .)
append1_in_aaaappend1_out_aaa([])
append1_in_aaaU4_aaa(append1_in_aaa)
U4_gaa(append1_out_aaa(L1)) → append1_out_gaa(.)
U4_aaa(append1_out_aaa(L1)) → append1_out_aaa(.)

The set Q consists of the following terms:

append2_in_aga(x0)
U5_aga(x0, x1)
U4_gaa(x0)
append1_in_aaa
U4_aaa(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

PERM_IN_AAU1_AA(append2_out_aga([], ., .))
U2_AA(L, append1_out_gaa(V)) → PERM_IN_AA
U1_AA(append2_out_aga(., ., y1)) → U2_AA(y1, U4_gaa(append1_in_aaa))
PERM_IN_AAU1_AA(U5_aga(., append2_in_aga(.)))
U1_AA(append2_out_aga([], ., y1)) → U2_AA(y1, append1_out_gaa([]))

The TRS R consists of the following rules:

append2_in_aga(L) → append2_out_aga([], L, L)
append2_in_aga(L2) → U5_aga(L2, append2_in_aga(L2))
U5_aga(L2, append2_out_aga(L1, L2, L3)) → append2_out_aga(., L2, .)
append1_in_aaaappend1_out_aaa([])
append1_in_aaaU4_aaa(append1_in_aaa)
U4_gaa(append1_out_aaa(L1)) → append1_out_gaa(.)
U4_aaa(append1_out_aaa(L1)) → append1_out_aaa(.)


s = U1_AA(append2_out_aga([], ., y1)) evaluates to t =U1_AA(append2_out_aga([], ., .))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U1_AA(append2_out_aga([], ., y1))U2_AA(y1, append1_out_gaa([]))
with rule U1_AA(append2_out_aga([], ., y1')) → U2_AA(y1', append1_out_gaa([])) at position [] and matcher [y1' / y1]

U2_AA(y1, append1_out_gaa([]))PERM_IN_AA
with rule U2_AA(L, append1_out_gaa(V)) → PERM_IN_AA at position [] and matcher [V / [], L / y1]

PERM_IN_AAU1_AA(append2_out_aga([], ., .))
with rule PERM_IN_AAU1_AA(append2_out_aga([], ., .))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.